package com.ruoyi.house_sale.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.HousemodelMapper;
import com.ruoyi.house_sale.domain.Housemodel;
import com.ruoyi.house_sale.service.IHousemodelService;

import javax.annotation.Resource;

/**
 * 户型资料Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-29
 */
@Service
public class HousemodelServiceImpl implements IHousemodelService 
{
    @Resource
    private HousemodelMapper housemodelMapper;

    /**
     * 查询户型资料
     * 
     * @param modelid 户型资料主键
     * @return 户型资料
     */
    @Override
    public Housemodel selectHousemodelByModelid(Long modelid)
    {
        return housemodelMapper.selectHousemodelByModelid(modelid);
    }

    /**
     * 查询户型资料列表
     * 
     * @param housemodel 户型资料
     * @return 户型资料
     */
    @Override
    public List<Housemodel> selectHousemodelList(Housemodel housemodel)
    {
        return housemodelMapper.selectHousemodelList(housemodel);
    }

    /**
     * 新增户型资料
     * 
     * @param housemodel 户型资料
     * @return 结果
     */
    @Override
    public int insertHousemodel(Housemodel housemodel)
    {
        return housemodelMapper.insertHousemodel(housemodel);
    }

    /**
     * 修改户型资料
     * 
     * @param housemodel 户型资料
     * @return 结果
     */
    @Override
    public int updateHousemodel(Housemodel housemodel)
    {
        return housemodelMapper.updateHousemodel(housemodel);
    }

    /**
     * 批量删除户型资料
     * 
     * @param modelids 需要删除的户型资料主键
     * @return 结果
     */
    @Override
    public int deleteHousemodelByModelids(Long[] modelids)
    {
        return housemodelMapper.deleteHousemodelByModelids(modelids);
    }

    /**
     * 删除户型资料信息
     * 
     * @param modelid 户型资料主键
     * @return 结果
     */
    @Override
    public int deleteHousemodelByModelid(Long modelid)
    {
        return housemodelMapper.deleteHousemodelByModelid(modelid);
    }

    @Override
    public List<Housemodel> findAllHouseModel() {
        return housemodelMapper.findAllHouseModel();
    }
}
